package com.binest.meetingInclusionMain.service.impl;

import java.util.List;

import com.binest.common.utils.DateUtils;
import com.binest.common.utils.uuid.IdUtils;
import com.binest.common.utils.uuid.UUID;
import com.binest.meetingInclusion.domain.MeetingInclusion;
import com.binest.meetingInclusion.mapper.MeetingInclusionMapper;
import com.binest.meetingInclusion.service.IMeetingInclusionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.meetingInclusionMain.mapper.MeetingInclusionMainMapper;
import com.binest.meetingInclusionMain.domain.MeetingInclusionMain;
import com.binest.meetingInclusionMain.service.IMeetingInclusionMainService;

/**
 * 会议收录主Service业务层处理
 * 
 * @author wwd
 * @date 2024-01-03
 */
@Service
public class MeetingInclusionMainServiceImpl implements IMeetingInclusionMainService 
{
    @Autowired
    private MeetingInclusionMainMapper meetingInclusionMainMapper;


    /**
     * 查询会议收录主
     * 
     * @param id 会议收录主主键
     * @return 会议收录主
     */
    @Override
    public MeetingInclusionMain selectMeetingInclusionMainById(String id)
    {
        return meetingInclusionMainMapper.selectMeetingInclusionMainById(id);
    }

    /**
     * 查询会议收录主列表
     * 
     * @param meetingInclusionMain 会议收录主
     * @return 会议收录主
     */
    @Override
    public List<MeetingInclusionMain> selectMeetingInclusionMainList(MeetingInclusionMain meetingInclusionMain)
    {
        return meetingInclusionMainMapper.selectMeetingInclusionMainList(meetingInclusionMain);
    }

    /**
     * 新增会议收录主
     * 
     * @param meetingInclusionMain 会议收录主
     * @return 结果
     */
    @Override
    public int insertMeetingInclusionMain(MeetingInclusionMain meetingInclusionMain)
    {
        String uuid = IdUtils.simpleUUID();
        meetingInclusionMain.setId(uuid);
        meetingInclusionMain.setCreateTime(DateUtils.getNowDate());
        return meetingInclusionMainMapper.insertMeetingInclusionMain(meetingInclusionMain);
    }

    /**
     * 修改会议收录主
     * 
     * @param meetingInclusionMain 会议收录主
     * @return 结果
     */
    @Override
    public int updateMeetingInclusionMain(MeetingInclusionMain meetingInclusionMain)
    {
        meetingInclusionMain.setUpdateTime(DateUtils.getNowDate());
        return meetingInclusionMainMapper.updateMeetingInclusionMain(meetingInclusionMain);
    }

    /**
     * 批量删除会议收录主
     * 
     * @param ids 需要删除的会议收录主主键
     * @return 结果
     */
    @Override
    public int deleteMeetingInclusionMainByIds(String[] ids)
    {
        return meetingInclusionMainMapper.deleteMeetingInclusionMainByIds(ids);
    }

    /**
     * 删除会议收录主信息
     * 
     * @param id 会议收录主主键
     * @return 结果
     */
    @Override
    public int deleteMeetingInclusionMainById(String id)
    {
        return meetingInclusionMainMapper.deleteMeetingInclusionMainById(id);
    }

    @Override
    public int addLikeCount(String id) {
        return meetingInclusionMainMapper.addLikeCount(id);
    }

    @Override
    public int reduceLikeCount(String id) {
        return meetingInclusionMainMapper.reduceLikeCount(id);
    }

    @Override
    public int addNoLikeCount(String id) {
        return meetingInclusionMainMapper.addNoLikeCount(id);
    }

    @Override
    public int reduceNoLikeCount(String id) {
        return meetingInclusionMainMapper.reduceNoLikeCount(id);
    }
}
